﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="xml" indent="yes"/>

  <xsl:include href="PasteMIF100323.xslt"/>
  
  <xsl:template match="@* | node()">
    <xsl:choose>
      <xsl:when test="MIF">
        <xsl:call-template name="DeleteText"/>
      </xsl:when>
      <xsl:when test="local-name()='Multi' and @Code='Point' and ../*/*/*/MIF/DATA">
        <xsl:call-template name="PastePoints"/>
      </xsl:when>
      <xsl:when test="local-name()='Multi' and @Code= 'Edge' and ../*/*/*/MIF/DATA">
        <xsl:call-template name="PasteEdges"/>
      </xsl:when>
      <xsl:when test="local-name()='Multi' and @Code= 'Square' and ../*/*/*/MIF/DATA">
        <xsl:call-template name="PasteSquares"/>
      </xsl:when>
      <xsl:when test="local-name()='ParamText' and @Code= 'ImportComment' and ../*/MIF/DATA">
        <xsl:call-template name="PasteComment">
          <xsl:with-param name="Region" select="'true'"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:copy>
          <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

</xsl:stylesheet>
